import {
	mapMutations
} from 'vuex'
export default {
	...mapMutations([
		'upUserInfo'
	]),
	selectTime(index){
		this.timeCurrent = index
		this.page = 1
		this.list = []
		this.getPageList()
	},
	toFollowLabels(id,name,color){
		uni.navigateTo({
			url: '/pages/my/followLabels?id='+id +'&name='+name+'&color='+color
		})
	},
	//获取我的影子列表
	getPageList() {
		let that = this
		if (that.loading) {
			return false
		}
		that.loading = true
		that.$httpRequest.get({
			that: that,
			url: 'h5/getUserCircles',
			params: {
				shadowType:that.timeCurrent,
				userId: that.id
			},
			success: res => {
				that.loading = false
				if (res.code === that.$httpConfig.SUCCESS_CODE) {
					that.list = res.data || []
				} else {
					
				}
			}
		})
	},
	getOtherUserInfo(id) {
		let that = this
		that.$httpRequest.get({
			that: that,
			url: 'h5/getUserInfo',
			params: {
				userId:id
			},
			success: res => {
				if (res.code === that.$httpConfig.SUCCESS_CODE) {
					that.otherUser = res.data
				} else {
					
				}
			}
		})
	},



	toSetUserInfo(){
		uni.navigateTo({
			url: '/pages/my/setUserInfo'
		})
	},


}
